<div class="card border-info m-3">
    <h5 class="card-header bg-info text-white">新增</h5>
    <div class="card-body">
        <h5 class="card-title">基础信息</h5>
        <p class="card-text">请按内容提示，录入相关信息。</p>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">编号</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serNum">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConIndexShowImg.serNum'] !== null">{{errRes.error?.detail['ConIndexShowImg.serNum']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">备注</button>
                    </div>
                    <input type="text" class="form-control border-info" [(ngModel)]="domain.serMemo">
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <ng-select [dropdownPosition]="'top'"
                           [closeOnSelect]="false"
                           [searchable]="true"
                           bindLabel="name" bindValue="id"
                           placeholder="轮播图类型" tooltip="轮播图类型"
                           [items]="[{id:'WAIT_AUDIT',name:'首页轮播图'},{id:'APPROVED',name:'商城推荐轮播图'},{id:'REJECT',name:'积分商城轮播图'}]"
                           [(ngModel)]="domain.serImgType">
                </ng-select>
            </div>
            <div class="col-6">
                <ng-container aria-label="ossUpload">
                    <div class="text-center mb-2"
                         *ngIf="domain.serShowPicture !== null && domain.serShowPicture !== undefined && domain.serShowPicture.length > 0">
                        <img [src]="domain.serShowPicture" style="height: 15rem;">
                        <p><span class="badge badge-success">{{domain.serShowPicture}}</span></p>
                    </div>
                    <input #file class="displayNone" type="file" ng2FileSelect
                           [uploader]="extend.domain.file.oss.uploader"
                           (change)="extend.domain.file.change($event)"/>
                </ng-container>
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">轮播图</button>
                    </div>
                    <div class="input-group-append w-75">
                        <button class="btn btn-default border-info w-100" type="button" (click)="file.click()">选择</button>
                    </div>
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConIndexShowImg.serShowPicture'] !== null">{{errRes.error?.detail['ConIndexShowImg.serShowPicture']}}</span>
            </div>
            <div class="col-6">
            </div>
        </div>


        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">审核状态</button>
                    </div>
                    <input type="text" class="form-control border-info" [readonly]="true"
                           [value]="extend.domain.serAudit()">
                    <input type="hidden" class="form-control border-info" [readonly]="true"
                           [(ngModel)]="domain.serAudit">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConIndexShowImg.serAudit'] !== null">{{errRes.error?.detail['ConIndexShowImg.serAudit']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">启用状态</button>
                    </div>
                    <div class="input-group-append w-75">
                        <button btnCheckbox btnCheckboxTrue="ENABLE" btnCheckboxFalse="DISABLE"
                                (click)="domain.serUsing = domain.serUsing === 'DISABLE' ? 'ENABLE' : 'DISABLE'"
                                class="btn border-info w-100" type="button"
                                [ngClass]="{'btn-primary': domain.serUsing === 'ENABLE', 'disabled btn-secondary': domain.serUsing === 'DISABLE'}">
                            {{domain.serUsing === 'DISABLE' ? '禁用' : '启用'}}
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <div class="row mb-3">
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">serValid</button>
                    </div>
                    <input type="text" class="form-control border-info" [value]="'serValid'">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConIndexShowImg.serValid'] !== null">{{errRes.error?.detail['ConIndexShowImg.serValid']}}</span>
            </div>
            <div class="col-6">
                <div class="input-group">
                    <div class="input-group-prepend w-25">
                        <button class="btn btn-info border-info w-100" type="button">serValid2</button>
                    </div>
                    <input type="text" class="form-control border-info" [value]="'serValid2'">
                </div>
                <span class="badge badge-danger" *ngIf="errRes.error?.detail['ConIndexShowImg.serValid2'] !== null">{{errRes.error?.detail['ConIndexShowImg.serValid2']}}</span>
            </div>
        </div>
        <div class="text-center mt-5">
            <button type="button" class="btn btn-outline-primary" (click)="func.save.req($event)">Save</button>
        </div>
    </div>
</div>

<span class="badge badge-info mr-3" *ngIf="errRes?.error?.timestamp !== null">response time: {{errRes?.error?.timestamp}}</span>
<div *ngIf="false">
    <p>{{errRes.error}}</p>
    <p>{{errRes.error?.code}}</p>
    <p>{{errRes.error?.description}}</p>
    <p>{{errRes.error?.theme}}</p>
    <p>{{errRes.error?.timestamp}}</p>
    <p>{{errRes.error?.detail?.RR?.duration}}</p>
    <p>{{errRes.error?.detail['ConIndexShowImg.serNum']}}</p>
    <p>{{errRes.error?.detail['ConIndexShowImg.serImgType']}}</p>
    <p>{{errRes.error?.detail['ConIndexShowImg.serShowPicture']}}</p>
    <p>{{errRes.error?.detail['ConIndexShowImg.serAudit']}}</p>
    <p>{{errRes.error?.detail['ConIndexShowImg.serValid']}}</p>
    <p>{{errRes.error?.detail['ConIndexShowImg.serValid2']}}</p>
    <p>{{errRes.headers}}</p>
    <p>{{errRes.message}}</p>
    <p>{{errRes.name}}</p>
    <p>{{errRes.ok}}</p>
    <p>{{errRes.status}}</p>
    <p>{{errRes.statusText}}</p>
    <p>{{errRes.url}}</p>
</div>
